package com.yjd.comm.raffle.enums;

/**
 * <b>description</b>：奖品类型 <br>
 * <b>time</b>：2015-1-18下午7:12:45 <br>
 * <b>author</b>： ready likun_557@163.com
 */
public enum PrizeTypeEnum {
	PT1(1, "小米充电宝"), PT2(2, "Kindle"), PT3(3, "iPad Mini 3"), PT4(4, "iPhone6"), PT5(
			5, "iPhone6 Plus"), PT6(6, "小米智能手环"), PT7(7, "新秀丽拉杆箱"), PT8(8,
			"华为Mate7"), PT9(9, "1116理财金"), PT10(10, "999理财金");
	private PrizeTypeEnum(Integer value, String description) {
		this.value = value;
		this.description = description;
	}

	private Integer value;
	private String description;

	public Integer getValue() {
		return value;
	}

	public String getDescription() {
		return description;
	}

	public static PrizeTypeEnum get(Integer value) {
		PrizeTypeEnum[] es = PrizeTypeEnum.values();
		for (PrizeTypeEnum e : es) {
			if (e.getValue().equals(value)) {
				return e;
			}
		}
		return null;
	}

	public static String getDesc(Integer value) {
		PrizeTypeEnum[] es = PrizeTypeEnum.values();
		for (PrizeTypeEnum e : es) {
			if (e.getValue().equals(value)) {
				return e.getDescription();
			}
		}
		return null;
	}

	public static void main(String[] args) {
		PrizeTypeEnum[] es = PrizeTypeEnum.values();
		for (PrizeTypeEnum prizeTypeEnum : es) {
			System.out.println(prizeTypeEnum.getValue() + ":"
					+ prizeTypeEnum.getDescription());
		}
	}
}
